#include <jni.h>

JavaVM* g_vm = 0;

JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* jvm, void* reserved)
{
	jint result = -1;
	JNIEnv* env = 0;

	do 
	{
		g_vm = jvm;
		
		if(jvm->GetEnv((void **)&env, JNI_VERSION_1_6) != JNI_OK)
			break;

		result = JNI_VERSION_1_6;

	} while (false);

	return result;
}